home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 August / Australian PC User - August 2003 (CD2).iso / software / online / files / netsnip.exe / %MAINDIR% / Templates / Bibliography / Bibliography (APA Style).xsl next >
Encoding:
Extensible Markup Language  |  2003-06-02  |  5.7 KB  |  195 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  4.  
  5.   <xsl:template match="/">
  6.  
  7.     <HTML>
  8.  
  9.     <head>
  10.  
  11.       <title>
  12.          <xsl:value-of select="Bibliography/FolderName"/> Bibliography (APA Style)
  13.       </title>
  14.     </head>
  15.  
  16.       <BODY>
  17.             
  18.     <table border="0" width="40%" cellspacing="0" cellpadding="2">
  19.       <tr><td>
  20.  
  21.            <b><font face="MS Sans Serif" size="2">
  22.              <xsl:value-of select="Bibliography/FolderName"/> Bibliography (APA Style)
  23.            </font></b>
  24.             <p/>
  25.       </td></tr>
  26.       
  27.       <tr><td>
  28.           <xsl:apply-templates select="Bibliography/FolderDetails"/>
  29.           <xsl:apply-templates select="Bibliography/SnippetDetails"/>
  30.       </td></tr>
  31.  
  32.   <tr>
  33.     <td><hr size="1"/><font face="MS Sans Serif" size="1">APA Style Bibliography Generated
  34.       by <a href="http://www.netsnippets.com">Net Snippets</a><sup>TM</sup></font></td>
  35.   </tr>
  36.  
  37.     </table>
  38.  
  39.       </BODY>
  40.     </HTML>
  41.  
  42.   </xsl:template>
  43.  
  44.  
  45.   <xsl:template match="FolderDetails">
  46.        <xsl:apply-templates select="FolderDetails"/>
  47.        <xsl:apply-templates select="SnippetDetails"/>
  48.  
  49.   </xsl:template>
  50.  
  51.  
  52.  
  53.   <xsl:template match="SnippetDetails">
  54.              
  55.  
  56.           <xsl:if test="/Bibliography/Settings/Biblio_Name">
  57.  
  58.         <b>
  59.                 <xsl:choose>
  60.                 <xsl:when test="/Bibliography/Settings/Biblio_LinkSnippet">
  61.                   <A>
  62.                     <xsl:attribute name="HREF"><xsl:value-of select="Path"/></xsl:attribute>
  63.                    <font size="1" face="MS Sans Serif">
  64.                     <xsl:value-of select="Name"/><xsl:value-of select="Extension"/> 
  65.                    </font> 
  66.                   </A>
  67.         </xsl:when> 
  68.                 
  69.             <xsl:otherwise>
  70.                    <font size="1" face="MS Sans Serif">
  71.                     <xsl:value-of select="Name"/><xsl:value-of select="Extension"/>
  72.                    </font> 
  73.                 </xsl:otherwise>
  74.         
  75.         </xsl:choose>
  76.         </b>
  77.  
  78.               </xsl:if> 
  79.            <br/>    
  80.                <font size="1" face="MS Sans Serif">
  81.    
  82.                <xsl:apply-templates select="Biblio" order-by="Authors"/>
  83.                </font>
  84.  
  85.   </xsl:template>
  86.  
  87.  
  88.   <xsl:template match="Biblio">
  89.     <xsl:choose>
  90.     <xsl:when test="Type[.='Web Site']">
  91.             <xsl:apply-templates select="Authors"/>
  92.             <i><xsl:value-of select="Title"/></i>.
  93.             <xsl:apply-templates select="Translators"/>
  94.             <xsl:apply-templates select="Compilers"/>
  95.             <xsl:apply-templates select="Editors"/>
  96.             <xsl:apply-templates select="Date_Created"/>
  97.             <xsl:apply-templates select="Date_Accessed"/>
  98.             <xsl:apply-templates select="URL"/>
  99.     </xsl:when> 
  100.  
  101.     <xsl:when test="Type[.='Book']">
  102.             <xsl:apply-templates select="Authors"/>
  103.             <xsl:apply-templates select="Date_Created"/>
  104.             <i><xsl:value-of select="Title"/></i>.
  105.             <xsl:apply-templates select="Translators"/>
  106.             <xsl:apply-templates select="Compilers"/>
  107.             <xsl:apply-templates select="Editors"/>
  108.             <xsl:apply-templates select="City"/>
  109.             <xsl:value-of select="Publisher"/>.
  110.             <xsl:apply-templates select="Date_Accessed"/>
  111.             <xsl:apply-templates select="URL"/>
  112.     </xsl:when> 
  113.  
  114.     <xsl:when test="Type[.='eJournal']">
  115.             <xsl:apply-templates select="Authors"/>
  116.             <xsl:apply-templates select="Date_Created"/>
  117.             <xsl:value-of select="Title"/>.
  118.             <xsl:apply-templates select="Name"/>
  119.             <xsl:apply-templates select="Date_Accessed"/>
  120.             <xsl:apply-templates select="URL"/>
  121.     </xsl:when> 
  122.  
  123.     <xsl:when test="Type[.='eZine']">
  124.             <xsl:apply-templates select="Authors"/>
  125.             <xsl:apply-templates select="Date_Created"/>
  126.             <xsl:value-of select="Title"/>.
  127.             <xsl:apply-templates select="Name"/>
  128.             <xsl:apply-templates select="Date_Accessed"/>
  129.             <xsl:apply-templates select="URL"/>
  130.     </xsl:when> 
  131.  
  132.     <xsl:when test="Type[.='Newspaper']">
  133.             <xsl:apply-templates select="Authors"/>
  134.             <xsl:apply-templates select="Date_Created"/>
  135.             <xsl:value-of select="Title"/>.
  136.             <xsl:apply-templates select="Name"/>
  137.             <xsl:apply-templates select="Date_Accessed"/>
  138.             <xsl:apply-templates select="URL"/>
  139.     </xsl:when> 
  140.  
  141.     <xsl:otherwise>
  142.          <b><font color="#FF0000">Type not currently supported in APA Style</font>: <xsl:value-of select="Type"/></b><br/>
  143.  
  144.     </xsl:otherwise>
  145.  
  146.     </xsl:choose>
  147.     <p/>
  148.  
  149.  </xsl:template>  
  150.  
  151.   <xsl:template match="Authors">
  152.       <xsl:value-of select="."/>.
  153.   </xsl:template>  
  154.  
  155.   <xsl:template match="Compilers">
  156.       <xsl:value-of select="."/>
  157.       (Comp.).
  158.   </xsl:template>  
  159.  
  160.   <xsl:template match="Editors">
  161.       <xsl:value-of select="."/>
  162.       (Ed.)
  163.   </xsl:template>  
  164.  
  165.   <xsl:template match="Translators">
  166.       (<xsl:value-of select="."/>, Trans.)
  167.   </xsl:template>  
  168.  
  169.   <xsl:template match="Date_Created">
  170.       (<xsl:value-of select="."/>).
  171.   </xsl:template>  
  172.  
  173.   <xsl:template match="Institution">
  174.       <xsl:value-of select="."/>.
  175.   </xsl:template>  
  176.  
  177.   <xsl:template match="Date_Accessed">
  178.       Retrieved
  179.       <xsl:value-of select="."/>,
  180.   </xsl:template>  
  181.  
  182.   <xsl:template match="Name">
  183.       <i><xsl:value-of select="."/></i>.
  184.   </xsl:template>  
  185.  
  186.   <xsl:template match="City">
  187.       <xsl:value-of select="."/>:
  188.   </xsl:template>  
  189.  
  190.   <xsl:template match="URL">
  191.       from 
  192.       <A><xsl:attribute name="HREF"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></A>
  193.   </xsl:template>  
  194.  
  195. </xsl:stylesheet>